using System;
using Microsoft.VisualStudio.Shell;

namespace HQLAddin.Intellisense
{
	public class TaskListWrapper : ITaskList
	{
		private readonly ErrorListProvider provider;

		public TaskListWrapper(ErrorListProvider provider)
		{
			this.provider = provider;
		}

		public void AddTask(Task task)
		{
			provider.Tasks.Add(task);
		}

		public void Clear()
		{
			provider.Tasks.Clear();
		}

		public void Dispose()
		{
			provider.Dispose();
		}
	}

	public interface ITaskList : IDisposable
	{
		void Clear();
		void AddTask(Task task);
	}
}